<?php
class TPLAdminTranslates {
	public static function TranslatesList($data) {
		global$Eleanor;
		$GLOBALS['jscripts'][]='/js/translates.js';
		// $lang=Eleanor::$Language[$GLOBALS['Eleanor']->mconfig['n']];
		$c = '';
		$Lst = Eleanor::LoadListTemplate('table-list', 1)->begin('Module');
		$url = PROTOCOL . Eleanor::$domain . Eleanor::$site_path;
		foreach ($data as $k => $v) {
			$c .= $Lst->item('<img class="module_lang_f" style="width: 10px; margin: 0 3px" src="'. $url .'images/icons/plus.gif"><span class="module_trans">'. $k .'</span>');
		}
		$c .= $Lst->end();
		$c .= '<script>
			transLangFile.data = jQuery.parseJSON(\''. json_encode($data) .'\');
			transLangFile.module = \''. $Eleanor->module['name'] .'\';
			transLangFile.url = \''. $url .'\';
			transLangFile.init();
		</script>';
		return Eleanor::$Template->Cover($c);
	}
}